home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Kit PC World De Ampliacion De Windows 95
/
Kit PC World de ampliacion de Windows 95.iso
/
clarion
/
gauge
/
gauge.z
/
CWDIALOG.CLW
< prev
next >
Wrap
Text File
|
1995-08-19
|
4KB
|
124 lines
Dialog PROGRAM
INCLUDE('KEYCODES.CLW')
MAP
DisplayDialog
INCLUDE('DDE.CLW')
END
OneShot BYTE(0)
Channel LONG(0)
Displays SIGNED(25)
Start SIGNED
Stop SIGNED
Duration REAL
DispsPerMin STRING(10)
Window WINDOW('Clarion for Windows'),AT(0,0,306,97),SYSTEM,GRAY,MAX
STRING('Display Dialog Performance Test:'),AT(4,4,112,10)
STRING(@N7.1),AT(116,4,25,10),USE(DispsPerMin),RIGHT
STRING('Displays / Minute'),AT(144,4,,)
BUTTON('&Run'),AT(208,2,,),USE(?Run)
BUTTON('E&xit'),AT(248,2,,),USE(?Exit)
END
CODE
OPEN(Window)
Window{PROP:Maximize} = True
Channel = DDESERVER('CWDIALOG')
ACCEPT
CASE EVENT()
OF EVENT:DDEcommand
PRESSKEY(AltR)
OneShot = 1
OF EVENT:Accepted
CASE FIELD()
OF ?Run
DO DisplayTest
IF OneShot THEN RETURN.
OF ?Exit
RETURN
END
END
END
DDECLOSE(Channel)
DisplayTest ROUTINE
DISABLE(?Run,?Exit)
SETCURSOR(CURSOR:Wait)
Start = CLOCK()
LOOP UNTIL CLOCK() > Start.
Start = CLOCK()
LOOP UNTIL CLOCK() <> Start.
Start = CLOCK()
LOOP Displays TIMES
DisplayDialog
END
Stop = CLOCK()
Duration = (Stop - Start) / 100 !Calculate time used
DispsPerMin = Displays * 60 / Duration !Calculate displays per minute
DISPLAY
SETCLIPBOARD(DispsPerMin)
ENABLE(?Run,?Exit)
SETCURSOR(CURSOR:Arrow)
DisplayDialog PROCEDURE
Name STRING('John Smith')
Address STRING('1234 Main Street')
City STRING('Anywhere')
State STRING('USA')
Zip STRING('10000')
HomePhone DECIMAL(10,0,4443456789)
WorkPhone DECIMAL(10,0,4443455678)
MaritalStatus STRING('Single')
Dependents DECIMAL(2,0,2)
Recruiting STRING('Advertisement')
Nights BYTE(1)
Weekends BYTE(1)
FillIn BYTE(1)
Dialog WINDOW('Personal Information'),AT(,,264,176),CENTER,SYSTEM,GRAY
PROMPT('&Name:'),AT(15,15,26,10)
ENTRY(@S25),AT(65,15,,10),USE(Name)
PROMPT('&Address:'),AT(15,30,,10)
ENTRY(@S25),AT(65,30,,10),USE(Address)
PROMPT('&City:'),AT(15,45,,10)
ENTRY(@S15),AT(65,45,,10),USE(City)
PROMPT('&State:'),AT(135,45,,10)
ENTRY(@S2),AT(160,45,15,10),USE(State)
PROMPT('&Zip:'),AT(185,45,,10)
ENTRY(@S5),AT(205,45,,10),USE(Zip)
PROMPT('&Home Phone:'),AT(15,60,,10)
ENTRY(@P(###)###-####P),AT(65,60,,10),USE(HomePhone)
PROMPT('&Work Phone:'),AT(135,60,,10)
ENTRY(@P(###)###-####P),AT(183,60,,10),USE(WorkPhone)
PROMPT('Marital Status'),AT(15,75)
LIST,AT(65,75,55,10),USE(MaritalStatus),DROP(4),FROM('Single |Married | Widowed | Divorced')
PROMPT('Dependents:'),AT(135,75,,10)
SPIN(@N2),AT(183,75,31,10),USE(Dependents)
OPTION('Recruiting'),AT(13,90,96,56),USE(Recruiting),BOXED
RADIO('Agency'),AT(22,102,,10),USE(?Agency)
RADIO('Advertisement'),AT(22,116,,10),USE(?Advertisement)
RADIO('Walk-in'),AT(22,130),USE(?WalkIn)
END
GROUP('Preferences'),AT(133,90,96,56),BOXED
CHECK('Nights'),AT(141,102,,10),USE(Nights)
CHECK('Weekends'),AT(141,116,,10),USE(Weekends)
CHECK('Fill-in'),AT(141,130,,10),USE(FillIn)
END
BUTTON('OK'),AT(72,155,,10),USE(?OK)
BUTTON('Cancel'),AT(140,155,,10),USE(?Cancel)
END
CODE
OPEN(Dialog)
ACCEPT
BREAK
END
CLOSE(Dialog)